// 引入vue-router模块
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
// 引入5个需要路由的vue组件 
import Home from '../views/Home.vue'
import Tv from '../views/Tv.vue'
import Movie from '../views/Movie.vue'
import Sprot from '../views/Sport.vue'
import Animation from '../views/Animation.vue'

// 创建集合存储路由条目 
const routes: Array<RouteRecordRaw> = [
    { path: '/', name:'Home',component: Home },
    { path: '/tv',  name:'Tv',component: Tv },
    { path: '/movie', name:'Movie', component: Movie },
    { path: '/sport', name:'Sport', component: Sprot },
    { path: '/Animation',  name:'Animation',component: Animation },
]

// 创建路由条目 --- django在urls.py中写入记录 
const router = createRouter({
    history: createWebHistory(),
    routes
})


// 暴露当前的TS模块 ---- 相当于 return 
export default router